import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '序号',
    align:"center",
    dataIndex: 'noId'
   },
   {
    title: '下达日期',
    align:"center",
    dataIndex: 'issDate'
   },
   {
    title: '是否居配',
    align:"center",
    dataIndex: 'isMatch'
   },
   {
    title: '合同号',
    align:"center",
    dataIndex: 'contractNumber'
   },
   {
    title: '销售人',
    align:"center",
    dataIndex: 'seller'
   },
   {
    title: '客户名称',
    align:"center",
    dataIndex: 'customer'
   },
   {
    title: '项目名称',
    align:"center",
    dataIndex: 'projectName'
   },
   {
    title: '合同内容',
    align:"center",
    dataIndex: 'contractContent'
   },
   {
    title: '产品类型',
    align:"center",
    dataIndex: 'projectType'
   },
   {
    title: '产品数量',
    align:"center",
    dataIndex: 'productNum'
   },
   {
    title: '关注点',
    align:"center",
    dataIndex: 'concerns'
   },
   {
    title: '用户要求时间（预计结束时间）',
    align:"center",
    dataIndex: 'planEndTime'
   },
   {
    title: '排产后时间',
    align:"center",
    dataIndex: 'productAfterTime'
   },
   {
    title: '调整后时间',
    align:"center",
    dataIndex: 'dateAdjustAfterTime'
   },
   {
    title: '调整后时间',
    align:"center",
    dataIndex: 'adjustAfterTime'
   },
   {
    title: '甲供到货时间',
    align:"center",
    dataIndex: 'sendTime'
   },
   {
    title: '长货期物料',
    align:"center",
    dataIndex: 'longGoodsTime'
   },
   {
    title: '一次料单',
    align:"center",
    dataIndex: 'oneMaterList'
   },
   {
    title: '二次物料是否完成0:未完成，1：已逾期：2:已完成,3：即将逾期',
    align:"center",
    dataIndex: 'comTwoMater'
   },
   {
    title: '二次料单',
    align:"center",
    dataIndex: 'twoMaterList'
   },
   {
    title: '甲供件资料',
    align:"center",
    dataIndex: 'sendFileTime'
   },
   {
    title: '辅料',
    align:"center",
    dataIndex: 'ingredientsTime'
   },
   {
    title: '屏面图',
    align:"center",
    dataIndex: 'panelDrawing'
   },
   {
    title: '单线图',
    align:"center",
    dataIndex: 'singleLineDrawing'
   },
   {
    title: '原理图是否完成0:未完成，1：已逾期：2:已完成，3：即将逾期',
    align:"center",
    dataIndex: 'comSchemDrawing'
   },
   {
    title: '原理图',
    align:"center",
    dataIndex: 'schemDrawing'
   },
   {
    title: '自制件BOM,0:未完成，1：已逾期：2:已完成，3：即将逾期',
    align:"center",
    dataIndex: 'comSelfBom'
   },
   {
    title: '自制件BOM',
    align:"center",
    dataIndex: 'selfRestraintBom'
   },
   {
    title: '外协件',
    align:"center",
    dataIndex: 'outsourcePart'
   },
   {
    title: '铜材预估',
    align:"center",
    dataIndex: 'copperProductTime'
   },
   {
    title: '铜排bom是否完成0:未完成，1：已逾期：2:已完成，3：即将逾期',
    align:"center",
    dataIndex: 'comCopperCableBom'
   },
   {
    title: '铜排bom',
    align:"center",
    dataIndex: 'copperCableBom'
   },
   {
    title: '电气工程师',
    align:"center",
    dataIndex: 'eleEngineer'
   },
   {
    title: '结构工程师',
    align:"center",
    dataIndex: 'struEngineer'
   },
   {
    title: '柜体到货',
    align:"center",
    dataIndex: 'cabArriveTime'
   },
   {
    title: '元器件到货',
    align:"center",
    dataIndex: 'eleDeviceTime'
   },
   {
    title: '例外信息',
    align:"center",
    dataIndex: 'exceInfo'
   },
   {
    title: '镀金加工',
    align:"center",
    dataIndex: 'gilding'
   },
   {
    title: '喷涂',
    align:"center",
    dataIndex: 'spray'
   },
   {
    title: '铜排加工',
    align:"center",
    dataIndex: 'copperProcess'
   },
   {
    title: '搪锡',
    align:"center",
    dataIndex: 'upTin'
   },
   {
    title: '包装方式',
    align:"center",
    dataIndex: 'packageType'
   },
   {
    title: '0:未完成，1:已完成，2:已逾期，3:已放弃',
    align:"center",
    dataIndex: 'isComplete'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '序号',
    field: 'noId',
    component: 'InputNumber',
  },
  {
    label: '下达日期',
    field: 'issDate',
    component: 'Input',
  },
  {
    label: '是否居配',
    field: 'isMatch',
    component: 'Input',
  },
  {
    label: '合同号',
    field: 'contractNumber',
    component: 'Input',
  },
  {
    label: '销售人',
    field: 'seller',
    component: 'Input',
  },
  {
    label: '客户名称',
    field: 'customer',
    component: 'Input',
  },
  {
    label: '项目名称',
    field: 'projectName',
    component: 'Input',
  },
  {
    label: '合同内容',
    field: 'contractContent',
    component: 'Input',
  },
  {
    label: '产品类型',
    field: 'projectType',
    component: 'Input',
  },
  {
    label: '产品数量',
    field: 'productNum',
    component: 'InputNumber',
  },
  {
    label: '关注点',
    field: 'concerns',
    component: 'Input',
  },
  {
    label: '用户要求时间（预计结束时间）',
    field: 'planEndTime',
    component: 'Input',
  },
  {
    label: '排产后时间',
    field: 'productAfterTime',
    component: 'Input',
  },
  {
    label: '调整后时间',
    field: 'dateAdjustAfterTime',
    component: 'DatePicker',
    componentProps: {
       showTime: true,
       valueFormat: 'YYYY-MM-DD HH:mm:ss'
     },
  },
  {
    label: '调整后时间',
    field: 'adjustAfterTime',
    component: 'Input',
  },
  {
    label: '甲供到货时间',
    field: 'sendTime',
    component: 'Input',
  },
  {
    label: '长货期物料',
    field: 'longGoodsTime',
    component: 'Input',
  },
  {
    label: '一次料单',
    field: 'oneMaterList',
    component: 'Input',
  },
  {
    label: '二次物料是否完成0:未完成，1：已逾期：2:已完成,3：即将逾期',
    field: 'comTwoMater',
    component: 'InputNumber',
  },
  {
    label: '二次料单',
    field: 'twoMaterList',
    component: 'Input',
  },
  {
    label: '甲供件资料',
    field: 'sendFileTime',
    component: 'Input',
  },
  {
    label: '辅料',
    field: 'ingredientsTime',
    component: 'Input',
  },
  {
    label: '屏面图',
    field: 'panelDrawing',
    component: 'Input',
  },
  {
    label: '单线图',
    field: 'singleLineDrawing',
    component: 'Input',
  },
  {
    label: '原理图是否完成0:未完成，1：已逾期：2:已完成，3：即将逾期',
    field: 'comSchemDrawing',
    component: 'InputNumber',
  },
  {
    label: '原理图',
    field: 'schemDrawing',
    component: 'Input',
  },
  {
    label: '自制件BOM,0:未完成，1：已逾期：2:已完成，3：即将逾期',
    field: 'comSelfBom',
    component: 'InputNumber',
  },
  {
    label: '自制件BOM',
    field: 'selfRestraintBom',
    component: 'Input',
  },
  {
    label: '外协件',
    field: 'outsourcePart',
    component: 'Input',
  },
  {
    label: '铜材预估',
    field: 'copperProductTime',
    component: 'Input',
  },
  {
    label: '铜排bom是否完成0:未完成，1：已逾期：2:已完成，3：即将逾期',
    field: 'comCopperCableBom',
    component: 'InputNumber',
  },
  {
    label: '铜排bom',
    field: 'copperCableBom',
    component: 'Input',
  },
  {
    label: '电气工程师',
    field: 'eleEngineer',
    component: 'Input',
  },
  {
    label: '结构工程师',
    field: 'struEngineer',
    component: 'Input',
  },
  {
    label: '柜体到货',
    field: 'cabArriveTime',
    component: 'Input',
  },
  {
    label: '元器件到货',
    field: 'eleDeviceTime',
    component: 'Input',
  },
  {
    label: '例外信息',
    field: 'exceInfo',
    component: 'Input',
  },
  {
    label: '镀金加工',
    field: 'gilding',
    component: 'Input',
  },
  {
    label: '喷涂',
    field: 'spray',
    component: 'Input',
  },
  {
    label: '铜排加工',
    field: 'copperProcess',
    component: 'Input',
  },
  {
    label: '搪锡',
    field: 'upTin',
    component: 'Input',
  },
  {
    label: '包装方式',
    field: 'packageType',
    component: 'Input',
  },
  {
    label: '0:未完成，1:已完成，2:已逾期，3:已放弃',
    field: 'isComplete',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}